﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KinectAlphaBeat
{
    public partial class TestDrawingAnalyzerForm : Form
    {
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new TestDrawingAnalyzerForm());
        }

        private DrawingAnalyzer _drawingAnalyzer;
        public TestDrawingAnalyzerForm()
        {
            InitializeComponent();
            _drawingAnalyzer = new DrawingAnalyzer();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int pX = Int32.Parse(textBox1.Text);
            int pY = Int32.Parse(textBox2.Text);
            int IMAGE_WIDTH = 640;
            int IMAGE_HEIGHT = 480;

            KinectDrawer.DrawerUserDrawingReadyEventArgs obj = new KinectDrawer.DrawerUserDrawingReadyEventArgs();
            obj.ImageHeight = IMAGE_HEIGHT;
            obj.ImageWidth = IMAGE_WIDTH;
            List<List<System.Drawing.Point>> data = new List<List<Point>>();
            List<System.Drawing.Point> line = new List<Point>();
            line.Add(new Point(pX, pY));
            data.Add(line);
            obj.DrawingData = data;

            _drawingAnalyzer.DrawerFinishedDrawing(this, obj);

        }

        private void TestDrawingAnalyzerForm_Load(object sender, EventArgs e)
        {

        }
    }
}
